import flet as ft
import time


def main(page: ft.Page):
    t = ft.Text(value="Hello, world!", size=30, color="green")
    page.controls.append(t)
    # page.update()

    t2 = ft.Text()
    page.add(t2)

    for i in range(10):
        t2.value = f"Step{i}"
        page.update()
        time.sleep(1)

    page.add(ft.Row(controls=[ft.Text("A"), ft.Text("B"), ft.Text("C")]))
    page.add(
        ft.Row(
            controls=[
                ft.TextField(label="Your name"),
                ft.ElevatedButton(text="Say my name!"),
            ]
        )
    )
    page.update()


ft.app(target=main)
